Robotic-assisted training of arm and hand functions